program Lines;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fin: TextFile;
  k, n, i, j, a, max: Integer;
  massxp, massyp, massa, massb, massc, massx1, massy1, massx2, massy2: array of Integer;

begin
  AssignFile(fin, 'Coord.txt');
  Reset(fin);
  read (fin, n);
  max:=((n*(n-1)) div 2);
  SetLength (massx1, n);
  SetLength (massy2, n);
  SetLength (massx2, n);
  SetLength (massy1, n);
  SetLength (massa, n);
  SetLength (massb, n);
  SetLength (massc, n);
  SetLength (massxp, max);
  SetLength (massyp, max);
  for i:=0 to n-1 do
  begin
    read (fin, massx1[i]);
    read (fin, massy1[i]);
    read (fin, massx2[i]);
    read (fin, massy2[i]);
  end;
  for i:=0 to n-1 do
  begin
    massa[i]:= massy1[i]-massy2[i];
    massb[i]:= massx2[i]-massx1[i];
    massc[i]:= massx1[i]*massy2[i]-massx2[i]*massy1[i];
  end;
  for i:=0 to n-2 do
  begin
    for j:=1+i to n-1 do
    begin
      if (massa[i]*massb[j]) <> (massb[i]*massa[j]) then
      begin
        massxp[k]:=(massb[i]*massa[i]*massc[j]-massc[i]*massa[i]*massb[j])div(massa[i]*(massa[i]*massb[j]-massa[j]*massb[i]));
        massyp[k]:=(massc[j]*massa[i]-massa[j]*massc[i])div(massa[j]*massb[i]-massb[j]*massa[i]);
      end else begin
        massxp[k]:=-1;
        massyp[k]:=-1;
      end;
      k:=k+1;
    end;
  end;
  for i:=0 to n-1 do
  begin
    for j:=1+i to n-1 do
    begin
      if (massxp[i] = massxp[j]) and (massyp[i] = massyp[j]) then
      begin
        massxp[j]:=-1;
        massyp[j]:=-1;
      end;
    end;
  end;
  a:=0;
  for i:=0 to n-1 do
  begin
    if (massxp[i] >= 0) and (massyp[i] >= 0) then
    begin
      a:=a+1;
    end;
  end;
  writeln(a);
  readln;
  CloseFile(fin);
end.
